<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>数组去重</title>
	</head>
	<body>
	</body>
	<script>
		//可以搜索一下filter函数的使用
		var remove = function(arr,item){
			return arr.filter(function(x){
				return x != 2;
			});
		}
		
		var arr1 = [1,2,3,4,5,6,72,2,2,2,4];
		console.log(remove(arr1));
		console.log(arr1);
	</script>
</html>
